package com.mallcai.bigdata.ladon.service.report.impl.handler.support.rule;

import com.mallcai.bigdata.ladon.dpl.vo.DataType;

import java.util.Objects;

/**
 * @author feixy
 * @version 1.0
 * @date 2019-07-20 18:47
 */
public class NotEqRuleOperator implements IRuleOperator {

    private static final String[] COMMANDS = {"neq", "not equals"};
    private static final DataType[] DATA_TYPES = DataType.values();

    @Override
    public boolean test(Object obj1, Object obj2) {
        return !Objects.equals(obj1, obj2);
    }

    @Override
    public String[] getCommands() {
        return COMMANDS;
    }

    @Override
    public DataType[] getSupportDataTypes() {
        return DATA_TYPES;
    }


}
